package org.misalen.web.database.util;

import java.util.LinkedList;
import java.util.List;

import org.misalen.annotations.ModelComment;

/**
 * 
 * 分页查询返回类
 * 
 * @author guochao
 *
 * @param <T>
 */

public class PaginationFrom<T> {
	@ModelComment(value = "外层List")
	private List<T> list;
	@ModelComment(value = "页数")
	private Integer page = 1;
	@ModelComment(value = "页宽")
	private Integer rows = 10;
	@ModelComment(value = "总数")
	private Long total = -1l;
	@ModelComment(value = "倒叙字段")
	private LinkedList<String> desc;
	@ModelComment(value = "正序字段")
	private LinkedList<String> asc;

	public Long getTotal() {
		return total;
	}

	public void setTotal(Long total) {
		this.total = total;
	}

	public List<T> getList() {
		return list;
	}

	public void setList(List<T> list) {
		this.list = list;
	}

	public LinkedList<String> getDesc() {
		return desc;
	}

	public void setDesc(LinkedList<String> desc) {
		this.desc = desc;
	}

	public LinkedList<String> getAsc() {
		return asc;
	}

	public void setAsc(LinkedList<String> asc) {
		this.asc = asc;
	}

	public Integer getPage() {
		return page;
	}

	public void setPage(Integer page) {
		this.page = page;
	}

	public Integer getRows() {
		return rows;
	}

	public void setRows(Integer rows) {
		this.rows = rows;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "PaginationFrom [list=" + list + ", page=" + page + ", rows=" + rows + ", total=" + total + ", desc="
				+ desc + ", asc=" + asc + "]";
	}

}
